package demo;

import org.junit.Test;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : EmployeeServiceTest
 * @Author : 54061
 * @Date: 2022/2/25 20:55
 */
public class EmployeeServiceTest {
    @Test
    public void test(){
        EmployeeService service = new EmployeeService();
        //所有员工对象
        service.get(employee -> true).forEach(employee -> System.out.println(employee));
        System.out.println("+++++++++++++++++++++++++++++++++++++++++++");
        //所有年龄超过35的员工
        service.get(employee -> employee.getAge()>35).forEach(employee -> System.out.println(employee));
        System.out.println("+++++++++++++++++++++++++++++++++++++++++++");
        //所有薪资高于15000的女员工
        service.get(employee -> employee.getSalary()>15000 && employee.getGender() == '女')
                .forEach(employee -> System.out.println(employee));
        System.out.println("+++++++++++++++++++++++++++++++++++++++++++");
        //所有编号是偶数的员工
        service.get(employee -> employee.getId()%2==0).forEach(employee -> System.out.println(employee));
    }

}
